package com.xhwl.centiotdata.service.cent;

import com.xhwl.common.dto.cent.pedes.BseduCheckDataDTO;
import com.xhwl.common.dto.cent.pedes.OpenDoorRecordDTO;
import com.xhwl.common.pojo.ResultJson;
import com.xhwl.common.vo.cent.passengerflow.PassengerFaceFlowCallbackVO;
import com.xhwl.common.vo.cent.pedes.ProjectPassWayVO;
import feign.Param;
import feign.RequestLine;
import org.springframework.cloud.openfeign.FeignClient;

import java.util.List;
import java.util.Map;

/**
 * @Author： lianghz
 * @Description：
 * @Date 2021/09/06/ 14:48
 */
@FeignClient(name = "cent-pedestrian")
public interface IPedestrianCentService {

    /**
     * 保存数字哨兵的查验记录
     * @param
     */
    @RequestLine("POST /activity-record-service/saveCheckData")
    void saveCheckData(@Param("bseduCheckDataDto") List<BseduCheckDataDTO> bseduCheckDTODataDto);

    @RequestLine("POST /activity-record-service/saveBatch")
    void saveBatch(@Param("openDoorRecordDTOList") List<OpenDoorRecordDTO> openDoorRecordDTOList);

    @RequestLine("POST /face-record-service/saveBatch")
    void saveFaceBatch(@Param("openDoorRecordDTOList") List<OpenDoorRecordDTO> openDoorRecordDTOList);

    @RequestLine("POST /pedestrian-flows/face-flow")
    ResultJson handleFlowFace(@Param("callbackVO") PassengerFaceFlowCallbackVO callbackVO);

    @RequestLine("POST /platform-residence/cardTransition")
    Map<Integer,String> cardTransition(@Param("projectId") Integer projectId, @Param("originCard") String originCard);


    /**
     * 根据项目配置的卡号转换规则 转换卡号
     * @param projectId 项目id
     * @param originCards 原始卡号
     * @return Map<productId,Map<originCard,targetCard>>
     */
    @RequestLine("POST /pedestrian-service/card-transitions")
    Map<Integer, Map<String,String>> cardTransition(@Param("projectId") Integer projectId,
                                       @Param("originCards") List<String> originCards);

    @RequestLine("POST /pedestrian-service/pass-way-list")
    List<ProjectPassWayVO> queryByProject(@Param("projectId") Integer projectId);

}
